<header class="mui-bar mui-bar-nav header">
  <div class="mui-icon mui-pull-left mui-action-menu" style="padding-top: 0px"><span class="mui-icon mui-icon-bars"></span></div>
  <h1 class="mui-title">搜索结果</h1>
</header>
<div class="mui-content">
  <!--图片轮播-->
  <div id="slider" class="mui-slider" >
    <div class="mui-slider-group mui-slider-loop">
      <div class="mui-slider-item mui-slider-item-duplicate">
        <a href="#">
          <img src="/images/qc.png">
        </a>
      </div>
      <div class="mui-slider-item">
        <a href="#">
          <img src="/images/qc.png">
        </a>
      </div>
      <div class="mui-slider-item">
        <a href="#">
          <img src="/images/qc.png">
        </a>
      </div>
      <div class="mui-slider-item">
        <a href="#">
          <img src="/images/qc.png">
        </a>
      </div>
      <div class="mui-slider-item">
        <a href="#">
          <img src="/images/qc.png">
        </a>
      </div>
      <div class="mui-slider-item mui-slider-item-duplicate">
        <a href="#">
          <img src="/images/qc.png">
        </a>
      </div>
    </div>
    <div class="mui-slider-indicator">
      <div class="mui-indicator mui-active"></div>
      <div class="mui-indicator"></div>
      <div class="mui-indicator"></div>
      <div class="mui-indicator"></div>
    </div>
  </div>
  <div class="title"><img src="/images/qct.png"/></div>
  <ul class="wrapper">

  </ul>
</div>
<div class="jl"></div>
<nav class="mui-bar mui-bar-tab">
  <a class="mui-tab-item" href="/">
    <span class="mui-icon "><i class="iconfont">&#xe601;</i></span>
    <span class="mui-tab-label">首页</span>
  </a>
  <a class="mui-tab-item mui-active" href="/list">
    <span class="mui-icon mui-icon-list"></span>
    <span class="mui-tab-label">列表</span>
  </a>
  <a class="mui-tab-item" href="/cart">
    <span class="mui-icon"><i class="iconfont">&#xe600;</i></span>
    <span class="mui-tab-label">购物车</span>
  </a>
  <a class="mui-tab-item" href="/account">
    <span class="mui-icon"><i class="iconfont">&#xe654;</i></span>
    <span class="mui-tab-label">我的</span>
  </a>
</nav>
<script>
  $(function () {
    var q = '<%= q%>';
    $.get('/api/search/?q='+q, function (call) {
      console.log(call);
      var html = '';
      for(var i=0; i<call.length; i++){
          html += '<li><a href="/products/'+call[i].sn+'"><div class="pic"><img src="http://auewe.oss-ap-southeast-2.aliyuncs.com/products/'+call[i].sn+'_thumb.jpeg" /></div><div class="text"><h2>'+call[i].name+'</h2><p><span>品牌：</span>'+call[i].brand+'</p><p><span>型号：</span>'+call[i].model+'</p><p><span>英文名：</span>'+call[i].pinyin+'</p></div><div class="price"><h3>$'+call[i].msrp+'<br>¥'+call[i].msrp*5+'</h3><button>立即抢购</button></div></a></li>'
      };
      $('.wrapper').html(html);
    })
  })
</script>
